using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace ClientGUI.Widgets.Support
{
    /// <summary>
    /// Used to store the on-screen position of modules while doing a layout.  It should know the
    /// actual (x, y) cords for this particular layout run.
    /// </summary>
    public class DisplayElement
    {
        private Module displayed;
        private Rectangle region;

        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="mod"></param>
        /// <param name="area"></param>
        public DisplayElement(Module mod, Rectangle area)
        {
            displayed = mod;
            region = area;
        }

        /// <summary>
        /// Module that is displayed in this area
        /// </summary>
        public Module Displayed
        {
            get
            {
                return displayed;
            }
        }

        /// <summary>
        /// Screen region occupied by this module.
        /// </summary>
        public Rectangle Region
        {
            get
            {
                return region;
            }
        }


        /// <summary>
        /// For debugging
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            return base.ToString() + "\n\t" +  region.ToString() + "\n\t" + displayed.ToString();
        }
    }
}
